﻿@using SunTzu.Utility;
@model form_project
@{
    ViewBag.Title = "文化产业项目发布";
    Layout = "~/Views/Shared/_LayoutUserCenter.cshtml";
    List<int> industries = new List<int>();
    if(!string.IsNullOrEmpty(Model.Industry))
    {
        industries.AddRange(Model.Industry.Split(',').Select(c => c.ParseToInt()));
    }
    
    bool isWaiting = Model.Id > 0 && Model.State == 0;
    bool isApproved = Model.State == 1;
    Model.Phase = Model.Phase.IsNullOrEmpty() ? "策划构思阶段" : Model.Phase;
}
<script src="/js/exhibitor.js"></script>
    <div class="registerForm registerFormInner">
    <form id="editForm" action="/Project/CreateProject?id=@Model.Id" method="post">
        <p class="registerFormTitle">文化产业项目发布</p>
        @if (isWaiting)
        {
        <p class="hCent redText">* 您的文化产业项目已经提交，正在等待审核。您可以继续修改以下内容</p>
        }
        else if (isApproved)
        {
        <p class="hCent redText">* 您的文化产业项目已经通过审核。</p>
        }
        <div class="registerFormSubTitle">文化产业项目信息</div>
        @*<p class="hCent">请您将您参展的特色内容或特色产品、展位活动信息填写清楚，以便我们进行遴选和媒体推荐。</p>*@
            
        <ul>
            <li class="formProp"><span>*</span>项目名称：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="Title" id="Title" value="@Model.Title" />
                <span targetId="Title" class="tipMsg">请输入项目名称</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>项目执行时间：</li>
            <li class="formLongLine">
                <input type="text" class="inputNormal required number" name="Month" id="Month" value="@(Model.Month > 0 ? Model.Month.ToString() : "")" />月
                <span targetId="Month" class="tipMsg">请输入项目执行时间</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>总投资额：</li>
            <li class="formLongLine">
                <input type="text" class="inputNormal required" name="Investment" id="Investment" value="@Model.Investment" />
                <span targetId="Investment" class="tipMsg">请输入总投资额</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>项目所处阶段：</li>
            <li class="formLongLine">
                <ul class="multiSelections">
                    <li>
                        <input type="radio" @(Model.Phase == "策划构思阶段" ? "checked" : "") name="Phase" value="策划构思阶段" /> 策划构思阶段
                    </li>
                    <li>
                        <input type="radio" @(Model.Phase == "启动阶段" ? "checked" : "") name="Phase" value="启动阶段" /> 启动阶段  
                    </li>
                    <li>
                        <input type="radio" @(Model.Phase == "稳定成长阶段" ? "checked" : "") name="Phase" value="稳定成长阶段" /> 稳定成长阶段
                    </li>
                    <li>
                        <input type="radio" @(Model.Phase == "成熟阶段" ? "checked" : "") name="Phase" value="成熟阶段" /> 成熟阶段
                    </li>
                </ul>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>项目知识产权情况：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="PropertyRights" id="PropertyRights" value="@Model.PropertyRights" />
                <span targetId="PropertyRights" class="tipMsg">请输入项目知识产权情况</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>项目介绍：</li>
            <li class="formLongLine">
                <textarea name="Description" id="Description" class="required textareaLong" rows="6" cols="5">@Model.Description</textarea>
                <span targetId="Description" class="tipMsg">请输入项目介绍</span>
            </li>
            <li class="clear"></li>
        </ul>
        <div class="registerFormSubTitle">项目性质</div>
        <ul>
            <li class="formProp">园区招商：</li>
            <li class="formLongLine">
                <ul class="multiSelections">
                    <li>
                        <input @((Model.ProjectType0 ?? "").Contains("0") ? "checked" : "") value="0"  type="checkbox" name="ProjectType0" /> 企业入驻
                    </li>
                    <li>
                        <input @((Model.ProjectType0 ?? "").Contains("1") ? "checked" : "") value="1"  type="checkbox" name="ProjectType0" /> 园区建设
                    </li>
                </ul>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">资金合作：</li>
            <li class="formLongLine">
                <ul class="multiSelections">
                    <li>
                        <input @((Model.ProjectType0 ?? "").Contains("2") ? "checked" : "") value="2"  type="checkbox" name="ProjectType0" /> 项目融资
                    </li>
                    <li>
                        <input @((Model.ProjectType0 ?? "").Contains("3") ? "checked" : "") value="3"  type="checkbox" name="ProjectType0" /> 投资项目
                    </li>
                </ul>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">经营合作：</li>
            <li class="formLongLine">
                <ul class="multiSelections">
                    <li>
                        <input @((Model.ProjectType0 ?? "").Contains("4") ? "checked" : "") value="4"  type="checkbox" name="ProjectType0" /> 产品代理
                    </li>
                    <li>
                        <input @((Model.ProjectType0 ?? "").Contains("5") ? "checked" : "") value="5"  type="checkbox" name="ProjectType0" /> 加盟合作
                    </li>
                    <li>
                        <input @((Model.ProjectType0 ?? "").Contains("6") ? "checked" : "") value="6"  type="checkbox" name="ProjectType0" /> 运营推广
                    </li>
                </ul>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">产品开发：</li>
            <li class="formLongLine">
                <ul class="multiSelections">
                    <li>
                        <input @((Model.ProjectType0 ?? "").Contains("7") ? "checked" : "") value="7"  type="checkbox" name="ProjectType0" /> 设计合作
                    </li>
                    <li>
                        <input @((Model.ProjectType0 ?? "").Contains("8") ? "checked" : "") value="8"  type="checkbox" name="ProjectType0" /> 生产开发
                    </li>
                    <li>
                        <input @((Model.ProjectType0 ?? "").Contains("9") ? "checked" : "") value="9"  type="checkbox" name="ProjectType0" /> 品牌推广
                    </li>
                </ul>
            </li>
            <li class="clear"></li>
        </ul>
        <div class="registerFormSubTitle">企业信息</div>
        <ul>
            <li class="formProp"><span>*</span>单位名称：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="CompanyName" id="CompanyName" value="@Model.CompanyName" />
                <span targetId="CompanyName" class="tipMsg">请输入单位名称</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>单位地址：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="Address" id="Address" value="@Model.Address" />
                <span targetId="Address" class="tipMsg">请输入单位地址</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>单位性质：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="Type" id="Type" value="@Model.Type" />
                <span targetId="Type" class="tipMsg">请输入单位性质</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>所属行业：</li>
            <li class="formLongLine">
                <ul class="multiSelections">
                @foreach (var industry in CacheHelper<code_industry>.GetAll().OrderBy(c => c.Order))
                {
                    <li @(industry.Title == "其他" ? "class=multiSelectionInput" : "")>
                        <input type="checkbox" @(industries.Contains(industry.Id) ? "checked" : "") name="Industry" value="@industry.Id" /> @industry.Title
                        @if (industry.Title == "其他")
                        {
                        <input type="text" name="ScopeOtherName" class="inputNormal" value="@Model.IndustryOtherName" />
                        }
                    </li>
                }
                </ul>
            </li>
            <li class="clear"></li>
        </ul>

        <ul>
            <li class="formProp"><span>*</span>法人代表：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="LegalPerson" id="LegalPerson" value="@Model.LegalPerson" />
                <span targetId="LegalPerson" class="tipMsg">请输入法人代表</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>负责人：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="MainPerson" id="MainPerson" value="@Model.MainPerson" />
                <span targetId="MainPerson" class="tipMsg">请输入负责人</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>联系人：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="Contacter" id="Contacter" value="@Model.Contacter" />
                <span targetId="Contacter" class="tipMsg">请输入联系人</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>联系电话：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="Tel" id="Tel" value="@Model.Tel" />
                <span targetId="Tel" class="tipMsg">请输入联系电话</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>手机：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required mobile" name="Mobile" id="Mobile" value="@Model.Mobile" />
                <span targetId="Mobile" class="tipMsg">请输入手机</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>传真：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="Fax" id="Fax" value="@Model.Fax" />
                <span targetId="Fax" class="tipMsg">请输入传真</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>Email：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required email" name="Email" id="Email" value="@Model.Email" />
                <span targetId="Email" class="tipMsg">请输入正确的Email</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">网址：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" name="Url" id="Url" value="@Model.Url" />
            </li>
            <li class="clear"></li>
        </ul>

        @if (!isApproved)
        {
        <div class="clear"></div>
        <div class="solidLine"></div>
        <div class="buttonBox">
            <a class="smallButton" href="javascript:void()" onclick="$('#editForm').submit();">@(Model.Id == 0 ? "提交申请" : "保存")</a>
            <div style="display: none">
                <input id="submitbutton" type="submit" value="提  交" />
                <input type="button" value="取  消" />
            </div>
        </div>
        }
    </form>
    </div>
